      SUBROUTINE PDTAPR
C      PRELIMINARY CALL TO DTAPRE FROM MAIN
      IMPLICIT REAL*8(A-H,O-Z)
      REAL*8 J2,J3,J4,J22
C
      COMMON/CNBODY/ J2,J3,J4,J22,ZJ20,ZMU,WWO,FLAT,AEARTH
C
      COMMON/IMAIN1/ IDATE,LSAVE,INOPT,IPLOT,NUMEQS,IPLTPE,IORB,ITAPE
C
      COMMON/TJAN1/ T
C
      COMMON/VECTRS/ XSAT(3),XSATDT(3),AD(3)
      DATA CONV/7.905355D0/
      DDATE=IDATE
      SEC=T
      CALL DTAPRE(ITAPE,IERR,DDATE,SEC,RX,RY,RZ,VX,VY,VZ)
      IF(IERR.LT.3)  GO TO 2000
      IF(IERR.LT.6)  GO TO 3000
      XSAT(1)=RX*AEARTH
      XSAT(2)=RY*AEARTH
      XSAT(3)=RZ*AEARTH
      XSATDT(1)=VX*CONV
      XSATDT(2)=VY*CONV
      XSATDT(3)=VZ*CONV
      RETURN
 2000 WRITE(6,2001)
 2001 FORMAT(' I/O ERROR ON EPHERMIS FILE IN MAIN')
      GO TO 2002
 3000 WRITE(6,3001)
 3001 FORMAT(' INFORMATION NOT AVAILABLE FOR REQUESTED TIME IN FINDGB')
C
2002  STOP
      END
